<template>
  <div class="find-car-item-recode">
    <div
      class="find-car-item"
      v-for="(item,index) in findCarInfoList"
      :key="index"
      @click="goDetail(item.status, item.id)"
    >
      <div class="title">
        {{ item.carModels }}
      </div>
      <div class="user-info">
        <div class="phone">
          {{ item.contactWay }}
        </div>
        <div class="name">
          {{ item.userName }}
        </div>
      </div>
      <div></div>
      <div class="time-info">
        <div class="time">
          {{ item.createTime }}
        </div>
        <div class="order">
          <span style="color: #67d8f9">{{ item.findCarStatus }}</span>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "createOrderFindCar",
  props: {
    /* activeTabChange: {
      type: String,
      default: "",
    }, */
    findCarInfoList: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {
      // 待生成订单列表
      /* findCarInfoList: [
        {
          id: "1234567890",
          carModels: "奥迪A6L新能源 2020款 55 TFSI e quattro qqqqqqq",
          img: require("../../../assets/image/4.png"),
          userName: "刘余旭",
          contactWay: "13467890123",
          createTime: "2021/08/09 12:11:10",
          statusText: "待生成订单",
          status: '00',
          // 寻车状态
          findCarStatus: "去处理>>",
        },
        {
          id: "098765432",
          carModels: "奥迪A6L新能源 2020款 55 TFSI e quattro qqqqqqq",
          img: require("../../../assets/image/4.png"),
          userName: "刘余旭",
          contactWay: "13467890123",
          createTime: "2021/08/09 12:11:10",
          statusText: "待生成订单",
          status: '00',
          // 寻车状态
          findCarStatus: "去处理>>",
        },
        {
          id: "0987654321",
          carModels: "奥迪A6L新能源 2020款 55 TFSI e quattro qqqqqqq",
          img: require("../../../assets/image/4.png"),
          userName: "刘余旭",
          contactWay: "13467890123",
          createTime: "2021/08/09 12:11:10",
          statusText: "待生成订单",
          status: '00',
          // 寻车状态
          findCarStatus: "去处理>>",
        },
        {
          id: "234567890",
          carModels: "奥迪A6L新能源 2020款 55 TFSI e quattro qqqqqqq",
          img: require("../../../assets/image/4.png"),
          userName: "刘余旭",
          contactWay: "13467890123",
          createTime: "2021/08/09 12:11:10",
          statusText: "待生成订单",
          status: '00',
          // 寻车状态
          findCarStatus: "去处理>>",
        },
        {
          id: "09876756",
          carModels: "奥迪A6L新能源 2020款 55 TFSI e quattro qqqqqqq",
          img: require("../../../assets/image/4.png"),
          userName: "刘余旭",
          contactWay: "13467890123",
          createTime: "2021/08/09 12:11:10",
          statusText: "待生成订单",
          status: '00',
          // 寻车状态
          findCarStatus: "去处理>>",
        },
      ], */
    };
  },
  methods: {
    // 点击列表数据跳转至详情页面
    goDetail(status, id) {
      // if (this.activeTabChange == "createOrderFindCar") {
      this.$router.push({
        name: "auditDetailFindCar",
        query: { status, id },
      });
      /* } else if (this.activeTabChange == "eventNotificationFindCar") {
        this.$router.push({
          name: "auditDetailFindCar",
          query: { status, id, activeTabChange: this.activeTabChange },
        });
      }else {
        this.$router.push({
          name: "auditDetailFindCar",
          query: { status, id, activeTabChange: this.activeTabChange },
        }); 
      }*/
    },
  },
};
</script>

<style lang="less" scoped>
.find-car-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  // width: 375px;
  height: 108px;
  background: #ffffff;
  padding: 16px 0;
  color: #333333;
  font-family: PingFangSC-Medium, PingFang SC;
  .title {
    font-size: 16px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 400;
    color: #666666;
    img {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background-color: #ffdecc;
    }
    .name {
      margin-top: 5px;
    }
    .phone {
      margin-top: 5px;
    }
  }
  .time-info {
    display: flex;
    justify-content: space-between;
    // margin-top: 15px;
    .time {
      font-size: 12px;
      font-weight: 400;
      color: #999999;
      margin-top: 5px;
    }

    .order {
      font-size: 12px;
      font-weight: 400;
    }
  }
}
.van-pull-refresh {
  height: 92vh;
  overflow: scroll;
}
.moretext {
  font-family: PingFangSC-Regular, PingFang SC;
  font-size: 12px;
  color: #999999;
  text-align: center;
  margin: 10px 0;
  letter-spacing: 1px;
}

.find-car-item-recode {
  padding: 0 16px;
}
.find-car-item {
  margin-top: 8px;
  // padding: 0 16px;
  padding: 16px;
}
</style>
<style lang="less">
.van-nav-bar .van-icon {
  color: #000000 !important;
}
.van-nav-bar__title {
  font-size: 17px !important;
  font-family: PingFangSC-Semibold, PingFang SC !important;
  font-weight: 600 !important;
  color: #000000 !important;
}
</style>